package com.yjzx.util.service.enums.file;

/**
 * @author yjzx
 * @date 2023/5/19
 * @Description office文件格式
 */
public enum OfficeFileTypeEnum implements FileType {
    /**
     * 文档
     */
    DOC(".doc", "application/msword"),
    DOT(".dot", "application/msword"),
    DOCX(".docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document"),
    DOTX(".dotx", "application/vnd.openxmlformats-officedocument.wordprocessingml.template"),
    DOCM(".docm", "application/vnd.ms-word.document.macroEnabled.12"),
    DOTM(".dotm", "application/vnd.ms-word.template.macroEnabled.12"),
    /**
     * 表格
     */
    XLS(".xls", "application/vnd.ms-excel"),
    XLT(".xlt", "application/vnd.ms-excel"),
    XLA(".xla", "application/vnd.ms-excel"),
    XLSX(".xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"),
    XLTX(".xltx", "application/vnd.openxmlformats-officedocument.spreadsheetml.template"),
    XLSM(".xlsm", "application/vnd.ms-excel.sheet.macroEnabled.12"),
    XLTM(".xltm", "application/vnd.ms-excel.template.macroEnabled.12"),
    XLAM(".xlam", "application/vnd.ms-excel.addin.macroEnabled.12"),
    XLSB(".xlsb", "application/vnd.ms-excel.sheet.binary.macroEnabled.12"),
    /**
     * ppt
     */
    PPT(".ppt", "application/vnd.ms-powerpoint"),
    POT(".pot", "application/vnd.ms-powerpoint"),
    PPS(".pps", "application/vnd.ms-powerpoint"),
    PPA(".ppa", "application/vnd.ms-powerpoint"),
    PPTX(".pptx", "application/vnd.openxmlformats-officedocument.presentationml.presentation"),
    POTX(".potx", "application/vnd.openxmlformats-officedocument.presentationml.template"),
    PPSX(".ppsx", "application/vnd.openxmlformats-officedocument.presentationml.slideshow"),
    PPAM(".ppam", "application/vnd.ms-powerpoint.addin.macroEnabled.12"),
    PPTM(".pptm", "application/vnd.ms-powerpoint.presentation.macroEnabled.12"),
    POTM(".potm", "application/vnd.ms-powerpoint.presentation.macroEnabled.12"),
    PPSM(".ppsm", "application/vnd.ms-powerpoint.slideshow.macroEnabled.12"),
    ;



    private final String extension;


    private final String mimeType;

    OfficeFileTypeEnum(String extension, String mimeType) {
        this.extension = extension;
        this.mimeType = mimeType;
    }

    @Override
    public String getExtension() {
        return extension;
    }

    @Override
    public String getMimeType() {
        return mimeType;
    }


}
